package com.itheima.day02;

import java.util.Hashtable;

public class Demo04 {
    public static void main(String[] args) throws InterruptedException {
        Hashtable<String,String> ht=new Hashtable<>();
        Thread th1=new Thread(()->{
            for(int i=0;i<25;i++){
                System.out.println(ht.put(i+"",i+""));
            }
        });
        Thread th2=new Thread(()->{
            for(int i=0;i<25;i++){
                System.out.println(ht.put(i+"",i+""));
            }
        });
        th1.start();
        th2.start();
        System.out.println("------------------");
        Thread.sleep(1000);
        for (int i = 0; i < 51; i++) {
            System.out.println(ht.get(i+""));

        }
    }
}
